A r t i c l e s
Navigation

Note: This site is
a bit older, personal views
may have changed.

M a i n P a g e

D i r e c t o r y

Prefix Function Names With Lover


Suppose you were having a hard time developing software because certain person was on the mind.

In order to fix the problem, utilize the said person's name. Simply prefix the function names with him/her.

Suppose said person was 'Jane'.


function Jane_DataValid(data: string): boolean;
begin
  if string = ' ' then 
  begin
     result:= false;
     exit;
  end;

  if string = '' then 
  begin 
    result:= false;
    exit;
  end;

  result:= true;
end;

procedure Jane_ParseData(s: string);
var i: integer;
begin
  if not Jane_DataValid(s) then exit;
  i:= 1;
  while i < length(s) do
  begin
    inc(i);
    // simple quote finder
    if i = '"' then 
      if inquote then inquote:= false else inquote:= true;
    // other nonsense, not optimized
    if inquote then 
      quotebuf:= quotebuf + s[i]; 
  end;
end;
After handing in the project to the coworkers or offering the project to the internet for people to use, insist tyrannically that the function naming scheme be kept as is (prefixed with said lover). If anyone disobeys or changes the functions (such as searching and replacing for all the prefixes and deleting them) then fire them and/or politely discuss with them the serious issues that will arise.

The productivity of a project is directly linear to the success of subject which is on the mind of the programmer. If the programmer does not embed said person in each and every function (or module name/unit name) somewhere, the programmer will simply not be productive. The programmer will wander off writing poems/notes to the said person instead of writing code for the project.

Embedding source code poems inside the files at the bottom, top, or in the middle of the file about said person is also permitted ocassionaly - but not to go as far as allowing the programmer to write more poems than source, since the code should be the poem the programmer is reading (and having said lover do things for him in the code such as Jane_ParseData allows programmer to feel wonderful about said person since she is obviously helping in parsing stage of the project - the code says so itself and shall not be disputed).

If other developers on the team question, resist, or shout at you for embedding said person in the functions, ask them if they want the work done, or if they want nothing done.

If multiple developers have different said persons on mind, certain files must be dedicated to each said lover. Example: miscutils dedicated to person1, netutils dedicated to person2.

Today's Lesson

In this software lesson, we learned that the software is the programmer's mind. The only way to increase productivity without losing the programmer completely to the said person, is to simply make the software become or become part of the said person instead.

If the programming language being used has namespaces, modules, or units available, it is acceptable to instead embed the said person into the module name, namespace, or unit name instead of always using Prefix_Style syntax.

unit JaneNetUtils

interface
  function PortValid: string;
  function IpValid: boolean;

implementation

function PortValid: string;
begin
  // code...
end;

function IpValid: boolean;
begin
  // it is essential to reference said person more than once each source file
  if JaneMiscUnit.IsEmpty(s) then exit;
  // code...
end;

end
If said person's name is long, it can be shortened to her nick name but it is not required.

As the name trickles through the modules, units, code, namespaces, etc. the said lover will sprinkle the source reminding the programmer to focus on the code since the code requires the said lover to be typed over and over again in different places. There is no hesitation to program, because the more coding that is done, the more the lover ends up showing up in the code and helping the project along.

It is not enough just to name the entire project after the said person, or code name the project after the person - because programmers don't read the project name, programmers read the code. Programmers need the said lover to help out in the project some way. Otherwise, the project is doomed.

Extreme Circumstances Not in Your Control

Under extreme circumstances, where one cannot embed the said name into the project due to existing naming standards being in place which can absolutely not be broken.. the programmer can then write all source code with said person sprinkled in code and run a pre-processor (which deletes prefix/said lover) before handing project file in to development team. Arguing that the 'pre-processor will take time to write and is a waste of time' is like saying that eating food is a waste of time since it requires using your hands to move the fork.
Replace 'her' with 'his' in above article if said person is opposite gender.

About
This site is about programming and other things.
_ _ _